// index.js
Page({
  num1:0,
  num2:0,
  data:{
    result:''
  },
  num1Input:function(e){
    //console.log(e.detail.value);
this.num1 = Number(e.detail.value)

  },
  num2Input:function(e){
this.num2 = Number(e.detail.value)
  },
  compare:function(){
    var str = ''
if(this.num1>this.num2){
str = '第一个数大'
}else if(this.num1<this.num2){
  str = '第二个数大'
}else{
  str = '两数相等'
}
this.setData({
  result:str
})
  }
})
